createElement

abstract fun createElement(tagName: String): Element

Creates and returns a new DOM element with the given tagName.

Return

a new Element instance

Parameters

tagName

a string that represents a tag name (e.g. "A", "P", "DIV") of the new DOM element

Throws

when tagName is empty or blank

when the document is closed